import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Layout',
    component: () => import('../views/layout/Layout.vue'),
    children: [
      {
        path: '/',
        name: 'home',
        component: () => import('../views/home/HomeView.vue')
      },
      {
        path: '/about',
        name: 'about',
        component: () => import( '../views/AboutView.vue')
      },
      {
        path: '/dest',
        component: () => import('../views/destination/index.vue')
      },
      {
        path: '/travel',
        component: () => import('../views/travel/Travel.vue')
      },
      {
        path: '/community',
        component: () => import('../views/community/Community.vue')
      },
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/login/Login.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  // base: process.env.BASE_URL,
  routes
})

export default router
